package com.community.bean;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.feng.fengDUtil.dao.annotation.ColumnIgnore;
import com.feng.fengDUtil.dao.annotation.Id;
import com.feng.fengDUtil.dao.annotation.Table;
import lombok.Data;

import java.sql.Timestamp;

@Data
@Table("user")
public class User {
    @Id
    private Integer id;
    private Integer roleId;
    private String account;
    private String nickname;
    private String password;
    private Timestamp createTime;
    private Integer creator;
    private Integer modifier;
    private Timestamp modifyTime;

    @ColumnIgnore
    private String roleName;

    @JsonIgnore
    public String getPassword() {
        return password;
    }

    @JsonProperty
    public void setPassword(String password) {
        this.password = password;
    }
}
